<?php #//v.3.3.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('./includes/config.inc.php');


$TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"));

$NOW = date("YmdHis",$TIME);

?>





    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>



<title>Bid on Penny Auctions.  QashQliq.com</title>
<meta name="description"
	content="QashQliq offers brand new products at incredible discounts through entertaining and exciting Penny Auctions" />
<meta name="keywords"
	content="gift card,gift,bid,shopping,discount,electronics,nintendo,nintendo ds,auction,netbook,dslite,qashqliq" />


<![if !IE]>
<link rel="stylesheet" type="text/css" href="global_not_ie.css" />
<![endif]>

<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="global_ie.css" />
<![endif]-->




<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">

<script language="JavaScript" src="ajax_global.js"></script>
<script type="text/javascript" src="SpryEffects.js"></script>
<script language="JavaScript">

function get_auction()
{

var x = Get_Auction ( "auction_data" );

var x2=x.split("|"); 

//currenttime = new Date(x2[0]);



<?php

 /* get ending soon auctions */
$query = "select ends,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends LIMIT ".$SETTINGS['endingsoonnumber'];
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);

$i=0;
$ii=0;
$active_area = "";
while($i < $num_auction) {
           
$i++;
$ii++;
$active_area .= "//ACTIVE AUCTION DATA #$i \r";
$active_area .= "//vvvvvvvvvvvvvvvv \r";


$active_area .= "currenttime$i$i$i = new Date(x2[0]);";
 
 $active_area .= "open$i = x2[$ii];\r";
 $ii++;
$active_area .= "ends$i = x2[$ii];";
$ii++;
$active_area .= "title$i = x2[$ii];";
$ii++;
$active_area .= "id$i = x2[$ii];";
$ii++;
$active_area .= "high_bidder$i = x2[$ii];";
$ii++;
$active_area .= "high_bid$i = x2[$ii];";
$ii++;
$active_area .= "picture_url$i = x2[$ii];\r";
 $ii++;
    $active_area .= "retail$i = x2[$ii];\r";
//$active_area .= "CountdownTimer$i();\r";
            
}


$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts DESC
         LIMIT ".$SETTINGS['lastitemsnumber'];
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);

$iii=0;
$i=0;
$holding_area = "";
while($iii < $num_auction1) {
           
$i++;
$ii++;
$holding_area .= "//HOLDING AUCTION DATA #$i \r";
$holding_area .= "//vvvvvvvvvvvvvvvv \r";
$holding_area .= "currenttime$i$i$i$i = new Date(x2[0]);";

 $holding_area .= "open$i$i = x2[$ii];\r";
 $ii++;
$holding_area .= "starts$i$i = x2[$ii];";
$ii++;
$holding_area .= "title$i$i = x2[$ii];";
$ii++;
$holding_area .= "id$i$i = x2[$ii];";
$ii++;
$holding_area .= "picture_url$i$i = x2[$ii];\r"; 
                                                 
 $ii++;
 $holding_area .= "retail$i$i = x2[$ii];\r";
 

//$holding_area .= "CountdownTimer$i();\r";
$iii++;
               
}



echo $active_area; 
echo $holding_area; 

?>
           

setTimeout("get_auction()", 5000);

}













                         <?php


$i=0;
$ii=0;
$sa = "";
while($i < $num_auction) {
           
$i++;
$ii++;


$sa .= "high_bid$i$i = 'x';";



}


echo $sa; 

?>













 
 
 
<?php

$i=0;
$ii=0;
$counter = "";
while($i < $num_auction) {

$ii++;

$counter .= "function CountdownTimer$ii(currenttime$ii) {";

//$counter .= "alert(currenttime1);";


$counter .= "secondsnow$ii = currenttime$ii.getSeconds();";

//$counter .= "alert(secondsnow);";

$counter .= "currenttime$ii$ii = currenttime$ii;";

$counter .= "secondslater$ii = secondsnow$ii + 1;";

//$counter .= "alert(secondslater);";

$counter .= "currenttime$ii$ii.setSeconds(secondslater$ii);";

//$counter .= "alert(currenttime2);";




$counter .= " var dthen = new Date(ends$ii);"; 
$counter .= " var dnow = currenttime$ii$ii; ";
//$counter .= "alert(dthen);";
//$counter .= "alert(dnow);";
$counter .= " ddiff = new Date(dthen-dnow);"; 
$counter .= " gsecs = Math.floor(ddiff.valueOf()/1000); ";


        $counter .= "if(high_bid$ii$ii == 'x') {";


$counter .= "high_bid$ii$ii = high_bid$ii;";

 $counter .= "}";


$counter .= "if(high_bid$ii$ii < high_bid$ii) {";


   
   //$counter .= "  document.getElementById('bid$ii').innerHTML = \"\"+ high_bid$ii +\"\";"; 
     
     
     
     
$counter .= "      (new Spry.Effect.Highlight(document.getElementById('highbid$ii'), {from:'#EF0000', to:'#FFFFFF', restoreColor: '#FFFFFF'})).start();      ";
  
                    $counter .= "high_bid$ii$ii = high_bid$ii;";


$counter .= "}";
                       
       //                $counter .= "  document.getElementById('bid$ii$ii').innerHTML = \"\"+ high_bid$ii$ii +\"\";"; ; 
 $counter .= "  document.getElementById('retail$ii').innerHTML = \"Retail Price: $\"+ retail$ii +\"\";";    
     
$counter .= "  document.getElementById('highbid$ii').innerHTML = \"$\"+ high_bid$ii +\"\";";   

$counter .= "  document.getElementById('highbidder$ii').innerHTML = \"\"+ high_bidder$ii +\"\";\r";

$counter .= "document.getElementById('href$ii').innerHTML=\"\" + title$ii +\"\";\r";

$counter .= "document.getElementById('href$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document.getElementById('href$ii$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document.getElementById('href$ii$ii$ii').href=\"item.php?id=\" + id$ii + \"\";";

$counter .= "document['item_pic$ii'].src =\"uploaded/\" + picture_url$ii + \"\";";

$counter .= "if(gsecs < -1) {";

$counter .= "document['bidbutton$ii'].src =\"images/bidbutton3.jpg\";";

$counter .= "}";

$counter .= "  setTimeout(\"CountdownTimer$ii(currenttime$ii$ii)\", 1000); ";

$counter .= "if(high_bid$ii != undefined) {";

$counter .= "   TimeFormatter(gsecs, \"countdown$ii\"); ";

$counter .= "}";

$counter .= "if(high_bid$ii == undefined) {";

$counter .= "  document.getElementById('retail$ii').innerHTML = \" \";";

$counter .= "  document.getElementById('highbid$ii').innerHTML = \" \";";   

$counter .= "  document.getElementById('highbidder$ii').innerHTML = \" \";\r";

$counter .= "document.getElementById('href$ii').innerHTML=\" \";\r";

$counter .= "document.getElementById('countdown$ii').innerHTML = \" \"; ";

$counter .= "document['bidbutton$ii'].src =\"images/blank.gif\";";

$counter .= "document['item_pic$ii'].src =\"images/blank.gif\";";

$counter .= "}";

$counter .= " }\r";



$i++;



}

echo $counter;

 ?>
 
 
 
 
 <?php
$i=0;
$ii=0;

$holding_counter = "";


while($i < $num_auction1) {

$ii++;



$holding_counter .= "function HoldingCountdownTimer$ii(acurrenttime$ii) {";


//$holding_counter .= "alert(currenttime1);";

$holding_counter .= "if(open$ii$ii == 2) {";
$holding_counter .= "asecondsnow$ii = acurrenttime$ii.getSeconds();";

//$holding_counter .= "alert(secondsnow);";

$holding_counter .= "acurrenttime$ii$ii = acurrenttime$ii;";

$holding_counter .= "asecondslater$ii = asecondsnow$ii + 1;";

//$holding_counter .= "alert(secondslater);";

$holding_counter .= "acurrenttime$ii$ii.setSeconds(asecondslater$ii);";

//$holding_counter .= "alert(currenttime2);";



//$holding_counter .= "alert(starts$ii$ii);";
$holding_counter .= " var dthen1 = new Date(starts$ii$ii);"; 
//$holding_counter .= "alert(dthen1);";
$holding_counter .= " var dnow1 = acurrenttime$ii$ii;";
//$holding_counter .= "alert(dnow1);";
$holding_counter .= " dddifff = new Date(dthen1-dnow1);"; 
$holding_counter .= " gsecs2 = Math.floor(dddifff.valueOf()/1000); ";
 //   $holding_counter .= "alert(gsecs2);";
 //$holding_counter .= "alert(dddifff);";

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \"Retail Price:<BR> $\"+ retail$ii$ii +\"\";";    




$holding_counter .= "document.getElementById('holding_href$ii$ii').innerHTML=\"\" + title$ii$ii +\"\";\r";



$holding_counter .= "document.getElementById('holding_href$ii').href=\"index.php\";";



$holding_counter .= "document.getElementById('holding_href$ii$ii').href=\"index.php\";";
$holding_counter .= "document.getElementById('holding_opens$ii').innerHTML=\"Auction Starts In: \";";  

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \"Retail Price:<BR> $\"+ retail$ii$ii +\"\";"; 

$holding_counter .= "retail$ii$ii$ii = retail$ii$ii;";

//$holding_counter .= "document.getElementById('holding_href$ii').innerHTML=\"<img src=uploaded/\" + picture_url$ii$ii +\" border=0>\";\r";

$holding_counter .= "document['holding_item_pic$ii'].src =\"uploaded/\" + picture_url$ii$ii + \"\";";
      //$holding_counter .= "alert(picture_url$ii$ii);";

$holding_counter .= "if(gsecs2 > -1 ) {";

$holding_counter .= "   HoldingTimeFormatter(gsecs2, \"holding_countdown$ii\"); ";
$holding_counter .= "}";
$holding_counter .= "}";



$holding_counter .= "if(title$ii$ii == undefined) {";

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \" \";";

//$holding_counter .= "  document.getElementById('holding_title$ii').innerHTML = \" \";";                 

$holding_counter .= "document.getElementById('holding_href$ii').innerHTML=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii$ii').innerHTML=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii').href=\" \";\r";

$holding_counter .= "document.getElementById('holding_href$ii$ii').href=\" \";\r";

$holding_counter .= "document.getElementById('holding_countdown$ii').innerHTML=\" \";";  

$holding_counter .= "document.getElementById('holding_opens$ii').innerHTML=\" \";";  


//$holding_counter .= "document['holding_item_pic$ii'].src =\"images/blank.gif\";";

$holding_counter .= "}";




$holding_counter .= "if(open$ii$ii == 1) {";

$holding_counter .= "  document.getElementById('holding_retail$ii').innerHTML = \"Retail Price:<BR> $\"+ retail$ii$ii$ii +\"\";";    




$holding_counter .= "document.getElementById('holding_href$ii$ii').innerHTML=\"\" + title$ii$ii +\"\";\r";



$holding_counter .= "document.getElementById('holding_href$ii').href=\"item.php?id=\" + id$ii$ii + \"\";";



$holding_counter .= "document.getElementById('holding_href$ii$ii').href=\"item.php?id=\" + id$ii$ii + \"\";";


//$holding_counter .= "document['holding_item_pic$ii'].src =\"uploaded/\" + picture_url$ii$ii + \"\";";
$holding_counter .= "document.getElementById('holding_opens$ii').innerHTML=\"Auction Starts In: \";";  

$holding_counter .= "  document.getElementById('holding_countdown$ii').innerHTML = \"<font color=red>NOW OPEN!</font>\";";  

$holding_counter .= " }";


$holding_counter .= "  setTimeout(\"HoldingCountdownTimer$ii(acurrenttime$ii$ii)\", 1000); ";



$holding_counter .= " }\r";




$i++;



}

echo $holding_counter;

 ?>
 
 
 
 
 

get_auction();

</script>

      


	    
  </head>
  <body onload=
  
  <?php


$i=0;
$ii=0;
$onload = "";
while($i < $num_auction) {
           
$i++;
$ii++;

$onload .= "CountdownTimer$i(currenttime$i$i$i);";

}

$i=0;
$ii=0;
while($i < $num_auction1) {
           
$i++;
$ii++;

$onload .= "HoldingCountdownTimer$i(currenttime$i$i$i$i);";

}

$onload .= "  bgcolor=#ffffff>";

echo $onload; 

?>
  
  


    
    

<?php

//include ("header_nav2.html");


require("./header2.php");


?>



<TABLE width=98% align=center border=0 BGCOLOR=>
<TR>
<TD align=center>



<FIELDSET><LEGEND>

<FONT COLOR=#3c5a00 size=+3><B>Live Auctions</B></FONT>
</LEGEND>


<?


/* get ending soon auctions */
$query = "select ends,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends LIMIT ".$SETTINGS['endingsoonnumber'];
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);


$i = 0;
$ii = 0;
$aja = "";

while($ii < $num_auction) {
         
   $title 	= mysql_result($result,$i,"title");
	$id 	= mysql_result($result,$i,"id");
	$ends 	= mysql_result($result,$i,"ends");
  $high_bidder 	= mysql_result($result,$i,"current_high_bidder");
	$high_bid 	= mysql_result($result,$i,"current_bid");
	$picture_url = mysql_result($result,$i,"pict_url");      
         
         
         
$i++;

$aja .= "<div class=\"ACTIVEBOX\" id=\"box$i\">\r";

$aja .= "<div class=\"TITLE\">\r";

$aja .= "  <a href=\"item.php?id=$id\" id=\"href$i\">\r";

$aja .= " $title$i   </a></div>\r";

$aja .= "<div class=\"RETAILPRICE\" id=\"retail$i\">\r";

$aja .= "--------\r";

//$aja .= "<p id=\"retail$i\">  </p>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"ITEMPIC\">\r"; 
  
//$aja .= "<p id=\"item_pic$i$i\" >\r";
 
$aja .= "  <a href=item.php?id=$id id=\"href$i$i\">\r";

$aja .= "  <img src='uploaded/$picture_url' 	alt='Auction Item' border='0' name=\"item_pic$i\">\r"; 
 
//$aja .= "    </a></p></div>\r";

$aja .= "    </a></div>\r";

$aja .= "<div class=\"COUNTDOWN\" id=\"countdown$i\"> 00:00:00\r";

///$aja .= "<p id=\"countdown$i\"> 00:00:00 </p>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"HIGHBID\" id=\"highbid$i\">\r";

//$aja .= "<p id=\"highbid$i\">\r";

//$aja .= "$high_bid  </p>\r";

  $aja .= "$high_bid  \r";

$aja .= "</div>\r";

$aja .= "<div class=\"HIGHBIDDER\" id=\"highbidder$i\">\r";

//$aja .= "<p id=\"highbidder$i\"> $high_bidder </p>\r";

$aja .= "$high_bidder </div>\r";

$aja .= "<div class=\"BIDBUTTON\" id=\"BIDBUTTON\">\r";

$aja .= "  <a href=item.php?id=$id id=\"href$i$i$i\" onmouseover=\"button('bidbutton$i','images/bidbutton2.jpg')\" 
onmouseout=\"button('bidbutton$i','images/bidbutton1.jpg')\"> \r";

$aja .= "<img  src=\"images/bidbutton1.jpg\" name=\"bidbutton$i\" border=0 alt='Bid Button'>\r";

$aja .= "    </a>\r";

$aja .= "</div>\r";

$aja .= "<div class=\"PROMO\">\r";
    
$aja .= "</div>\r";

$aja .= "<div class=\"TYPE\">\r";

$aja .= "</div>\r";

$aja .= "</div> \r";

$ii++;
  
         }
  
      echo $aja;
  
  ?> 
 
   </FIELDSET>
  </TD>
  </TR>
  </TABLE>
 
  
  
  
  
  
 <?php






$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts DESC
         LIMIT ".$SETTINGS['lastitemsnumber'];
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);


$ii = 0;
$i = 0;
$spacer = "1";
$holding_area = "";
$holding_area .= "<div class=\"HOLDINGBOXTOP\" id=\"holding_box$i\">\r";
$holding_area .= "</div>\r";

while($ii < $num_auction1) {
         
   $title 	= mysql_result($result,$ii,"title");
	$id 	= mysql_result($result,$ii,"id");
	$starts 	= mysql_result($result,$ii,"starts");
$picture_url = mysql_result($result,$ii,"pict_url");      
         
  
$i++;


$holding_area .= "<div class=\"HOLDINGBOXMIDDLE\" id=\"holding_box$i$i\">\r";
    
    
    if ( $num_auction1  > 1 && $ii > 0 )
       {
        $hr = "<HR color=#999999 width=95%>";
     $holding_area .= $hr;
       
             
       }



$holding_area .= "<div class=\"HOLDINGITEMPIC\">\r"; 
  
//$holding_area .= "<p id=\"item_pic$i$i\" >\r";
 
$holding_area .= "  <a href=item.php?id=$id id=\"holding_href$i\">\r";

$holding_area .= "  <img src='uploaded/$picture_url' 	alt='Auction Item' Border='' name=\"holding_item_pic$i\">\r"; 
 
//$holding_area .= "    </a></p></div>\r";

$holding_area .= "    </a></div>\r";


$holding_area .= "<div class=\"HOLDINGTITLE\" id=\"holding_title$i\">\r";

$holding_area .= "  <a href=\"item.php?id=$id\" id=\"holding_href$i$i\">\r";

$holding_area .= " $title   </a></div>\r";


$holding_area .= "<div class=\"HOLDINGRETAILPRICE\" id=\"holding_retail$i\">\r";

//$holding_area .= "<p id=\"retail$i\">  </p>\r";

$holding_area .= "</div>\r";



$holding_area .= "<div class=\"HOLDINGOPENS\" id=\"holding_opens$i\">\r";

//$holding_area .= "<p id=\"retail$i\">  </p>\r";

$holding_area .= "</div>\r";


$holding_area .= "<div class=\"HOLDINGCOUNTDOWN\" id=\"holding_countdown$i\"> \r";

///$holding_area .= "<p id=\"countdown$i\"> 00:00:00 </p>\r";

$holding_area .= "</div>\r";

$holding_area .= "</div>\r";








  
     
        
        
        
 $ii++;       
 $spacer++;       
        
        
         }
  
  $holding_area .= "<div class=\"HOLDINGBOXBOTTOM\" id=\"holding_box$i$i$i\">\r";

$holding_area .= "</div>\r";
      echo $holding_area;
  ?>  
  
  
  
    </DIV>
<DIV class=PAGEWRAPPERBOTTOM>
    </DIV>
     </DIV>
     <DIV class="ADBOX">
     
     </DIV>

  </body>
  </html>